﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddSongLink.aspx.cs" Inherits="Admin_Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="top-bar select-bar">
        <a href="AddSongAlbum.aspx" class="button">Add Album</a>
        <h1>
            <b>Song Link</b></h1>
        <asp:Label ID="lblmsg" Font-Bold="true" Width="100%" runat="server" BackColor="Red"
            ForeColor="White" EnableTheming="False"></asp:Label>
    </div>
    <br />
    <div>
        <table>
            <tr>
                <td>
                    <asp:Label ID="lblSongCategory" Font-Bold="true" runat="server" Text="Select Song Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlSongCategory" runat="server" Width="150%" OnSelectedIndexChanged="ddlSongCategory_SelectedIndexChanged"
                        AutoPostBack="true">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblSelectAlbum" Font-Bold="true" runat="server" Text="Select Album: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlAlbum" AutoPostBack="true" runat="server" Width="150%" OnSelectedIndexChanged="ddlAlbum_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblSongTitle" Font-Bold="true" runat="server" Text="Song Title: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtSongTitle" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblArtistName" Font-Bold="true" runat="server" Text="Artist Name: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtArtistName" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblSongLink" Font-Bold="true" runat="server" Text="Download Link: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDownloadLink" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblLinkOwner" Font-Bold="true" runat="server" Text="Owner: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtLinkOwner" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td align="center">
                    <asp:Button ID="btnAddCategory" Font-Bold="true" OnClientClick="return ValidateAddSongDownloadLink('ddlSongCategory','ddlAlbum','txtSongTitle','txtArtistName','txtDownloadLink','txtLinkOwner')"
                        Text="Add" runat="server" onclick="btnAddCategory_Click" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div>
        <asp:GridView ID="grdSong" runat="server" AutoGenerateColumns="false" ShowHeader="true"
            Width="150%">
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblSongID" Text='<%# DataBinder.Eval(Container.DataItem,"SongLinkID")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Song Title">
                    <ItemTemplate>
                        <asp:Label ID="lblTitle" Text='<%# DataBinder.Eval(Container.DataItem,"SongName")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Song Artist">
                    <ItemTemplate>
                        <asp:Label ID="lblArtist" Text='<%# DataBinder.Eval(Container.DataItem,"Artist")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Download Link">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDownloadLink" Text='<%# DataBinder.Eval(Container.DataItem,"DownloadLink")%>' PostBackUrl='<%# DataBinder.Eval(Container.DataItem,"DownloadLink")%>'
                            runat="server"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Link Owner">
                    <ItemTemplate>
                        <asp:Label ID="lblOwner" Text='<%# DataBinder.Eval(Container.DataItem,"LinkOwner")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" EditImageUrl="~/Admin/img/edit-icon.gif"
                    ButtonType="Image" />
            </Columns>
            <AlternatingRowStyle BackColor="ButtonShadow" />
            <HeaderStyle BackColor="SpringGreen" />
        </asp:GridView>
        </asp:GridView>
    </div>
</asp:Content>
